package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 承包商检查类型对象 t_contractor_safetycheck_category
 * 
 * @author ruoyi
 * @date 2021-12-14
 */
public class TContractorSafetycheckCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 唯一ID */
    private String id;

    /** 类型名称 */
    @Size(min = 0, max = 60, message = "类型名称长度不能超过60个字符")
    @Excel(name = "类型名称")
    private String caption;

    /** 父类型ID */
    @Excel(name = "父类型ID")
    private String parentid;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createts;

    /** 创建人 */
    @Excel(name = "创建人")
    private Long createdby;

    /** 公司 */
    @Excel(name = "公司")
    private Long companyid;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setCaption(String caption) 
    {
        this.caption = caption;
    }

    public String getCaption() 
    {
        return caption;
    }
    public void setParentid(String parentid) 
    {
        this.parentid = parentid;
    }

    public String getParentid() 
    {
        return parentid;
    }
    public void setCreatets(Date createts) 
    {
        this.createts = createts;
    }

    public Date getCreatets() 
    {
        return createts;
    }
    public void setCreatedby(Long createdby) 
    {
        this.createdby = createdby;
    }

    public Long getCreatedby() 
    {
        return createdby;
    }
    public void setCompanyid(Long companyid) 
    {
        this.companyid = companyid;
    }

    public Long getCompanyid() 
    {
        return companyid;
    }
    /** 子数据 */
    private List<TContractorSafetycheckCategory> children = new ArrayList<TContractorSafetycheckCategory>();

    public List<TContractorSafetycheckCategory> getChildren() {
        return children;
    }

    public void setChildren(List<TContractorSafetycheckCategory> children) {
        this.children = children;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("caption", getCaption())
            .append("parentid", getParentid())
            .append("createts", getCreatets())
            .append("createdby", getCreatedby())
            .append("companyid", getCompanyid())
            .toString();
    }
}
